<template>
 <div class="container">
      <form class="form-signin">
        <h2 class="form-signin-heading">Please sign in</h2>
        <label for="inputPhone" class="sr-only">Email address</label>
        <input type="text" id="inputPhone" class="form-control" placeholder="Phone Number" v-model="user.phone" required autofocus>
        <label for="inputPassword" class="sr-only">Password</label>
        <input type="password" id="inputPassword" class="form-control" placeholder="Password" v-model="user.password" required>
        <div class="checkbox">
          <label>
            <input type="checkbox" value="remember-me"> Remember me
          </label>
        </div>
        <button class="btn btn-lg btn-primary btn-block" type="submit" @click="loginEven">Sign in</button>
      </form>
    </div> <!-- /container -->
</template>

<script>
// import { reactive } from '@vue/reactivity'
// import store from '../store'
// import {useStore} from 'vuex'
// export default {
//     setup() {
//         let store = useStore();

//         let user=reactive({
//             phone:"",
//             password:"",
//             });
//         // let phone=reactive("");
//         // let password=reactive("");
//         const loginEven=async function () {
//             let result = await this.$store.dispatch('phoneLogin',{phone:this.phone,password:this.password})
//             if(result.data.code===20){
//                 this.$router.push('/me')
//             }
//         };

//         return {
//             user,
//             // phone,
//             // password,
//             loginEven
//         }
//     }
// }
</script>